<!DOCTYPE html>
<html >

<head>
    <meta charset="utf-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1" />
    <meta http-equiv="Cache-Control" content="no-siteapp" />
    <meta name="viewport" content="initial-scale=1, maximum-scale=3, minimum-scale=1, user-scalable=no">
    <meta name="apple-mobile-web-app-capable" content="yes" />
    <link rel="stylesheet" href="__PUBLIC__/index/css/reset.css" />
    <script src="__PUBLIC__/index/js/jquery-1.9.1.min.js"></script>
    <script src="__PUBLIC__/index/js/layer/layer.js"></script>
    <title>订单详情</title>
</head>
<style>
.zl-user-writeinfo {background-color: #fff; padding: 15px;max-width: 600px; margin: 0 auto;  }
.zl-user-writeinfo>h3 { color: #102972; padding-bottom: 25px; padding-top: 15px; }
.zl-buyOrding b{font-size: 14px; color: #666;}
.zl-buyOrding p{line-height: 40px; border-bottom: 1px solid #eee; font-size: 16px;}
.zl-buyPro{  margin: 10px 0; border: 1px solid #eee; padding: 5px;}
.zl-buyPro span{display: block; width: 100%; line-height: 40px;}
.zl-buyPro img{margin-right: 3px; border: 1px solid #102972;height: 100px}
#zl-choPay{padding-bottom: 20px;}
#zl-choPay li{position: relative; float: left; width: 24%; margin-right:1%; border-radius: 10px; border: 2px solid #eee;overflow: hidden; }
.chsothis{border: 2px solid #102972!important;}
    
    @media screen and (max-width: 800px) {
        #zl-choPay li{width: 42%!important;margin-right:3%; } 
    }
.chsothis:after{position: absolute; top: -24px; right: -38px; display: block; content: '选择';  width: 80px; height: 50px;line-height: 80px; text-align: center; background-color: #102972; color: #fff; font-size: 12px; transform: rotate(45deg); z-index: 9;}
#zl-choPay h3{padding: 15px 0;}
.zl-user-writeinfo button.zl-user-writebtn {width: 100%; height: 40px; border: none; background-color: #102972;color: #fff; font-size: 16px; font-family: "微软雅黑";border-radius: 6px; }
</style>

<body>
    <div class="zl-user-writeinfo">
        <h3 class="txt-c">[ 订单信息 ]</h3>
        
        <div class="zl-buyOrding" >
            <p><b>姓名：</b>{$list.name}</p>
            <p><b>手机：</b>{$list.phone}</p>
            <p><b>邮箱：</b>{$list.email}</p>
            <p><b>订单名称：</b>{$list.product}</p>
            <p><b>付款金额 ：</b>￥36666</p>
            <p><b>订单号：</b>{$list.order}</p>
            <div class="zl-buyPro clearfix"><span class="fl"><b>购买产品：</b>{$list.product}</span>
            	<php>
            		
						if($list['product']=="PP1"){
							echo '<img src="__PUBLIC__/index/images/p-1.jpg" class="fl">';
						}
						if($list['product']=="焦炭1号"){
							echo '<img src="__PUBLIC__/index/images/p-2.jpg" class="fl">';
						}
						if($list['product']=="螺纹1号"){
							echo '<img src="__PUBLIC__/index/images/p-3.jpg" class="fl">';
						}
						if($list['product']=="铁矿1号"){
							echo '<img src="__PUBLIC__/index/images/p-4.jpg" class="fl">';
						}

            	</php>
            </div>
            <ul id="zl-choPay" class="clearfix">
                <h3>支付方式</h3>
               
                <li class="chsothis"><img src="__PUBLIC__/index/images/pay2.jpg"></li>
            </ul>
           <button class="zl-user-writebtn" type="button" id="pay">立即支付</button>
        </div>
    </div>
    <!--./个人信息提交-->

</body>
<script>
	$(function(){
		//判断设备
		
        var sUserAgent = navigator.userAgent.toLowerCase();
        var bIsIpad = sUserAgent.match(/ipad/i) == "ipad";
        var bIsIphoneOs = sUserAgent.match(/iphone os/i) == "iphone os";
        var bIsMidp = sUserAgent.match(/midp/i) == "midp";
        var bIsUc7 = sUserAgent.match(/rv:1.2.3.4/i) == "rv:1.2.3.4";
        var bIsUc = sUserAgent.match(/ucweb/i) == "ucweb";
        var bIsAndroid = sUserAgent.match(/android/i) == "android";
        var bIsCE = sUserAgent.match(/windows ce/i) == "windows ce";
        var bIsWM = sUserAgent.match(/windows mobile/i) == "windows mobile";
        
        if (bIsIpad || bIsIphoneOs || bIsMidp || bIsUc7 || bIsUc || bIsAndroid || bIsCE || bIsWM) {
            var url="{:U('Index/wappay')}?order=";
        } else {
            var url="{:U('Index/pcpay')}?order=";
        };
      

       
		$("#pay").click(function(){
			window.open(url+"{$list.order}");
			setTimeout(function (){check()},5000);
		})
		
		
		function check(){
			var data={order:"{$list.order}"};
			var crl="{:U('Index/check')}";
			$.post(crl,data,function(obj){
				if(obj.s){
					layer.msg("付款成功,订单号已经通过短信的形式发送到您的手机,工作人员将在24小时内联系您请保持通信正常!");
					setTimeout(function (){window.location.href="{:U('Index/index')}"},5000)
				}else(
					setTimeout(function (){check()},5000)
				)
			})
		}
		
	})
	
</script>
</html>